import { ElLoading } from 'element-plus'
export type MediaType = 1 | 2 | 3 | 4;
export type MediaTypeString = '广角' | '变焦' | '红外' | '表示其他' | '全景';
export const photoTypeOptions = [
  { value: 1, label: '广角' },
  { value: 2, label: '变焦' },
  { value: 3, label: '红外' },
  { value: 4, label: '表示其他' },
  { value: 9, label: '全景' }
]
export const MediaTypeMap = {
  1: '广角图片',
  2: '变焦图片',
  3: '红外图片',
  4: '表示其他',
}
export interface IExt {
  payloadModelKey: string;
  original: boolean;
  fileGroupId: string;
  droneModelKey: string;
  sn: string;
}
export interface IShootPosition {
  lng: number;
  lat: number;
}

export interface IMetadata {
  gimbalYawDegree: number;
  absoluteAltitude: number;
  createdTime: string;
  relativeAltitude: number;
  shootPosition: IShootPosition;
}

export interface ICallBackParam {
  ext: IExt;
  path: string;
  metadata: IMetadata;
  objectKey: string;
  name: string;
}

export interface IMedia {
  call_back_param: ICallBackParam;
  file_id: string;
  file_name: string;
  file_path: string;
  file_size: number;
  fileSize: string;
  object_key: string;
  sub_file_type: number;
  is_original: boolean;
  drone: string;
  payload: string;
  tinny_fingerprint: string;
  fingerprint: string;
  create_time: string;
  media_type: number | string;
  mediaType: number | string;
  photo_type: MediaType;
  job_id: string;
  signed_url: string;
  src_signed_url: string;
  job_name: string;
  wayline_id: string;
  wayline_name: string;
  resolution: string;
  duration?: number | string;
  latitude?: number | string;
  longitude?: number | string;
  altitude?: number | string;
}

// 提取 ElTreeSelect 的实例类型
export type ElLoadingInstance = ReturnType<typeof ElLoading.service>;
